<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>IFlyRecognizerView Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">IFlyMSC </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">iflytek</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/delegate">delegate</option>
		
	</optgroup>
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/cancel">- cancel</option>
		
		<option value="//api/name/initWithCenter:">- initWithCenter:</option>
		
		<option value="//api/name/initWithOrigin:">- initWithOrigin:</option>
		
		<option value="//api/name/parameterForKey:">- parameterForKey:</option>
		
		<option value="//api/name/setAutoRotate:">- setAutoRotate:</option>
		
		<option value="//api/name/setParameter:forKey:">- setParameter:forKey:</option>
		
		<option value="//api/name/start">- start</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">IFlyRecognizerView Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>UIView</td>
</tr><tr>
	<th>Conforms to</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>IFlyRecognizerView.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>语音识别控件
录音时触摸控件结束录音，开始识别（相当于旧版的停止）；触摸其他位置，取消录音，结束会话（取消）
出错时触摸控件，重新开启会话（相当于旧版的再说一次）；触摸其他位置，取消录音，结束会话（取消）</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/delegate" title="delegate"></a>
	<h3 class="method-title"><code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>设置委托对象</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, assign) id&lt;IFlyRecognizerViewDelegate&gt; delegate</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/initWithOrigin:" title="initWithOrigin:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithOrigin:">&ndash;&nbsp;initWithOrigin:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>初始化控件</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (id)initWithOrigin:(CGPoint)<em>origin</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>origin</code></th>
						<td><p>控件左上角的坐标</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>IFlyRecognizerView 对象</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/initWithCenter:" title="initWithCenter:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithCenter:">&ndash;&nbsp;initWithCenter:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>初始化控件</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (id)initWithCenter:(CGPoint)<em>center</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>center</code></th>
						<td><p>控件中心的坐标</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>IFlyRecognizerView 对象</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/setAutoRotate:" title="setAutoRotate:"></a>
	<h3 class="method-title"><code><a href="#//api/name/setAutoRotate:">&ndash;&nbsp;setAutoRotate:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>设置横竖屏自适应</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)setAutoRotate:(BOOL)<em>autoRotate</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>autoRotate</code></th>
						<td><p>默认值YES，横竖屏自适应</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/setParameter:forKey:" title="setParameter:forKey:"></a>
	<h3 class="method-title"><code><a href="#//api/name/setParameter:forKey:">&ndash;&nbsp;setParameter:forKey:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>设置识别引擎的参数
识别的引擎参数(key)取值如下：</p>

<table>
<thead>
<tr><th>*参数</th><th><em>描述</em></th>
</tr>
</thead>
<tbody>
<tr><td>domain</td><td>应用的领域: 取值为:iat、search、video、poi、music、asr；<br/>iat：普通文本听写；<br/>search：热词搜索；<br/>video：视频音乐搜索；<br/>video：视频音乐搜索；<br/>asr：关键词识别;</td></tr>
<tr><td>vad_bos</td><td>前端点检测: 静音超时时间，即用户多长时间不说话则当做超时处理； 单位：ms；<br/>engine指定iat识别默认值为5000；<br/>其他情况默认值为 4000，范围 0-10000。</td></tr>
<tr><td>vad_eos</td><td>后断点检测: 后端点静音检测时间,即用户停止说话多长时间内即认为不再输入,<br/>自动停止录音；单位:ms;<br/>sms 识别默认值为 1800;<br/>其他默认值为 700，范围 0-10000。</td></tr>
<tr><td>sample_rate</td><td>采样率:目前支持的采样率设置有 16000 和 8000。</td></tr>
<tr><td>asr_ptt</td><td>标点符号设置: 默认为 1，当设置为 0 时，将返回无标点符号文本。</td></tr>
<tr><td>result_type</td><td>返回结果的数据格式: 可设置为json，xml，plain，默认为json。</td></tr>
<tr><td>grammarID</td><td>识别的语法id: 只针对 domain 设置为”asr”的应用。</td></tr>
<tr><td>asr_audio_path</td><td>音频文件名: 设置此参数后，将会自动保存识别的录音文件。<br/> 路径为Documents/(指定值)。<br/>不设置或者设置为nil，则不保存音频。</td></tr>
<tr><td>params</td><td>扩展参数: 对于一些特殊的参数可在此设置，一般用于设置语义。</td></tr>
</tbody>
</table>

			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)setParameter:(NSString *)<em>value</em> forKey:(NSString *)<em>key</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>value</code></th>
						<td><p>参数对应的取值</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>key</code></th>
						<td><p>识别引擎参数</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>成功返回YES；失败返回NO</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/parameterForKey:" title="parameterForKey:"></a>
	<h3 class="method-title"><code><a href="#//api/name/parameterForKey:">&ndash;&nbsp;parameterForKey:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>获取识别引擎参数</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NSString *)parameterForKey:(NSString *)<em>key</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>key</code></th>
						<td><p>参数key</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>参数值</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/start" title="start"></a>
	<h3 class="method-title"><code><a href="#//api/name/start">&ndash;&nbsp;start</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>开始识别</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (BOOL)start</code></div>

		    
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>成功返回YES；失败返回NO</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/cancel" title="cancel"></a>
	<h3 class="method-title"><code><a href="#//api/name/cancel">&ndash;&nbsp;cancel</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>取消本次识别</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)cancel</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">IFlyRecognizerView.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2016 iflytek. All rights reserved. Updated: 2016-05-25</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>